## Snippets from SnipMate, taken from
## https://github.com/scrooloose/snipmate-snippets.git

snippet ar "array"
$$1 = array($2);$3
endsnippet

snippet q
$$1 = $2;$3
endsnippet

snippet class "class"
/**
 * ${1}
 */
class ${2:ClassName} {
	${3}
	function ${4:__construct}(${5:argument}) {
		${6:// code...}
	}
}
endsnippet

snippet def "def"
define('${1}'${2});${3}
endsnippet

snippet do "do"
do {
	${2:// code... }
} while (${1:/* condition */});"
endsnippet

snippet wh
while (${1:$row = $${2:itpDB}->fetchArray($res)}) {
	$3
}
endsnippet

snippet doc_f "doc_f"
/**
 * $2
 * @return ${4:void}
 * @author ${5:`!v g:snips_author`}
 **/
${1:public }function ${2:someFunc}(${3})
{${6}
}
endsnippet

snippet doc_i "doc_i"
/**
 * $1
 * @package ${2:default}
 * @author ${3:`!v g:snips_author`}
 **/
interface ${1:someClass}
{${4}
} // END interface $1"
endsnippet

snippet else "else"
else {
	$1
}
endsnippet

snippet for "for"
for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {
	${4:// code...}
}
endsnippet

snippet foreach "foreach"
foreach ($1 as $$2) {
	$3;
}
endsnippet

snippet if
if ($1) {
	$2;
}
endsnippet

snippet ife
if (!empty($1)$2) {
	$3;
}
endsnippet

snippet inc "inc"
include '${1:file}';${2}
endsnippet

snippet req1 "req1"
require_once '${1:file}';${2}
endsnippet

snippet t "t"
$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5}
endsnippet

snippet var "var"
var_dump($${1});${2}
endsnippet

snippet dd
print_dd($$1);
endsnippet

snippet d
print_d($$1);
endsnippet

snippet st
str(${1:$}$2);
endsnippet

snippet ts
$$1time_start = microtime(true);
$$1elapsed = round((microtime(true) - $$1time_start), 2);
endsnippet

snippet sql
$sql = "${1:Select $2 from} ".$${3:itpDB}->prefix('$4')." $5${6:Where $7}"$8;
endsnippet

snippet gs
$$1 = $${2:itpDB}->getArrays("Select $3 from ".$$2->prefix('$4')${5:." Where $6"}$7);
endsnippet

snippet ga
$$1 = $${2:itpDB}->getArray("Select $3 from ".$$2->prefix('$4')${5:." Where $6"}$7);
endsnippet

snippet gv
$$1 = $${2:itpDB}->getValue("Select $3 from ".$$2->prefix('$4')${5:." Where $6"}$7);
endsnippet

snippet res
${1:res} = $${2:itpDB}->queryF("$3 ".$$2->prefix('$4')${5:." $6"});$7
endsnippet

snippet qf
$${1:itpDB}->queryF("$2${3:".$$1->prefix('$4')${5:." $6"}});$7
endsnippet

snippet e
exit;
endsnippet

snippet round
$$1 = round(${2:($3$$1)}, ${4:2});
endsnippet


# :vim:ft=snippets:
#
